function RGB2HEX(value){
    var match = value.match(/\w*\(\s*(\d*),\s*(\d*),\s*(\d*)\)/);
	if(!match) return value;
	var txt = '#'
	for(var i=1; i< 4; i++){
		var value = parseInt(match[i]);
		txt+= (value< 16 ? '0' : '')+value.toString(16)
	}
	return txt;
}